import java.awt.event.MouseAdapter;
import java.awt.event.MouseEvent;

class MouseListen extends MouseAdapter
{
	private TestGameState gs;
	
	public MouseListen(TestGameState gs)
	{
		this.gs = gs;
	}
	
	public void mousePressed(MouseEvent me)
	{
//		Bullet tempB = new Bullet(gs.getPlayer().getX()+Math.cos(gs.getPlayer().getAngle())*20,gs.getPlayer().getY()+Math.sin(gs.getPlayer().getAngle())*20,gs.getPlayer().getAngle());
//		tempB.setToDefaultImage();
//		gs.getEntities().add(tempB);
		gs.getPlayer().setFire(true);
	}
	
	public void mouseReleased(MouseEvent me)
	{
		gs.getPlayer().setFire(false);
	}
	
	public void mouseMoved(MouseEvent me)
	{
		gs.getPlayer().setMouse(me.getX(),me.getY());
	}
	
	public void mouseDragged(MouseEvent me)
	{
		gs.getPlayer().setMouse(me.getX(),me.getY());
	}
}